﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace Licenta1.RayTracer
{
    class PointLight
    {
        Vector point;
        Colors color;
        double fade_distance;

        public PointLight(Vector point)
        {
            this.point = point;
        }

        public PointLight(Vector point, Colors c)
            : this(point)
        {
            color = c;
        }

        public PointLight(Vector point, Colors c, double fade)
            : this(point,c)
        {
            fade_distance = fade;
        }

        public Vector POINT
        {
            get { return point; }
        }

        //public Color COLOR
        //{
        //    get { return color.getColor(); }
        //}

        public Colors COLORS
        {
            get { return color; }
        }

        public double FADE_DISTANCE
        {
            get { return fade_distance; }
        }

        //fade power
        public double Intensity(double distance)
        {
            if (distance >= fade_distance)
                return 0;

            return distance / fade_distance;
        }
    }
}
